import * as geometries from './views/geometry/index'
import * as helpers from './views/helper'
import * as lights from './views/light'
import * as curves from './views/curve'
import * as curve3s from './views/curve3'
import * as materials from './views/material'
import * as examples from './views/examples'
import * as objects from './views/objects'
import * as Tests from './views/test'
import * as Animations from './views/animation'

const createList = {
  ...geometries,
  ...helpers,
  ...lights,
  ...curves,
  ...curve3s,
  ...materials,
  ...examples,
  ...objects,
  ...Tests,
  ...Animations
}
type name = keyof typeof createList
const refresh = (dom: HTMLElement, id: string) => {
  const name = `create${id}` as name
  const fn = createList[name]
  if (!fn) return
  fn(dom)
}

export {
  refresh
}
